
#pragma once
#include <winsock2.h>
#include<fstream>
#include<iostream>
#include<string>
#define MAX_size 20//设置文件最大字节数，到时候再改
class CServer_UDP
{
public:
	CServer_UDP();
	void SendMsg(const char sendBuf[]);
	void RecMsg();
	~CServer_UDP();
	void getTimeToFileName(std::string&m_file_name);
	void openFile();
	void closeFile();
private:
	SOCKET m_sServer;
	struct sockaddr_in m_SocAddrClient;		//建立连接时，用于保存客户端信息
	bool m_terminal;
	std::string m_file_name;//文件名
	std::string m_file_name_last;
	std::ofstream ofile;//数据文件流
	//FILE *file;
	long long unsigned data_size;
	//bool open_file_flag;
};
